Skip to content

feat: Ground Combat Rebalance#431

Merged
EttyKitty merged 54 commits intomainfrom
feat/combat-overhaul
Jan 29, 2026
Merged

feat: Ground Combat Rebalance#431
EttyKitty merged 54 commits intomainfrom
feat/combat-overhaul

Conversation

@EttyKitty
Copy link
Copy Markdown
Collaborator

@EttyKitty EttyKitty commented Jan 15, 2025

This PR migrated from here EttyKitty#163.

As per original description:

Intent:

  • Create a definite Hierarchy for weapons including tiers and classes to ensure player has meaningful armament choice and progression in the Armamentarium for his marine's equipment.
  • Rebalance damage and max kill values in line with the established hierarchy and class system.
  • Balance durability for all ground units so that chapters can tackle targets as less than a doom stack.
  • Create descriptive guide documentation for each weapon class so as to guide future additions. (Half way done)

Desired End-state

  • Weapons are tangible choices with trade-offs that affect battle outcomes.
  • Squad loadouts are more indicative of intended battlefield role (Tank hunters and Horde breakers).

Changes

  • New Features
    • New weapon: Wrist-Mounted Storm Bolter
    • New weapon: Shotgun
    • New weapon: Omnissian Axe
    • New back item: Cyclone Missile Launcher
    • New weapon: Deathwatch Sniper Rifle
  • Balance Updates
    • Comprehensive rebalance of weapon and armor stats.
    • Adjusted unit stats for various factions.
    • Revised vehicle durability and armor values for several vehicle types.
    • Refined boarding combat odds and weapon bonuses.
  • Improvements
    • Enhanced boarding combat system with tag-based weapon bonuses and more granular odds.
    • Improved compatibility checks and error handling for equipping mobility gear.
    • Consolidated Strenguard and Vanguard veteran squad types.
    • Centralized weapon lists for easier management and consistency.
    • Enhanced armor piercing logic for more granular effects.
  • Bug Fixes
    • Corrected tooltips and visual feedback for damage resistance and mobility gear compatibility.
    • Fixed redundant or inconsistent variable usage.
  • Refactor
    • Streamlined combat message handling and player turn setup.
    • Improved melee attack calculations and explanations.
  • Other
    • Refactored and streamlined internal logic for combat and equipment systems.
    • Minor documentation and description corrections.

Notes

A related PR: #315
A structured doc with all said rebalance changes:
https://docs.google.com/spreadsheets/d/1ZMPRXjmd3tWvFmWiIYb-nQ9qT5PYPiu_75SJNhcYqvg/edit?gid=1993273333#gid=1993273333

@sourcery-ai

This comment was marked as outdated.

@github-actions github-actions bot added Type: Feature Adds something new Size: Big labels Jan 15, 2025
@EttyKitty EttyKitty added the Category: Balance Affects game balance label Jan 16, 2025
@EttyKitty EttyKitty changed the title feat: Ground combat overhaul (#352) feat: Ground combat overhaul Jan 23, 2025
@OH296 OH296 force-pushed the feat/combat-overhaul branch from 1eabd4f to 51b6826 Compare January 24, 2025 20:47
@OH296
Copy link
Copy Markdown
Collaborator

OH296 commented Jan 24, 2025

rebased onto current development

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 21, 2025
@EttyKitty EttyKitty added the Category: Improvement Makes something better label Feb 21, 2025
@EttyKitty EttyKitty marked this pull request as ready for review June 24, 2025 03:37
Copy link
Copy Markdown
Collaborator

@Blogaugis Blogaugis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see any obvious issues.

@EttyKitty EttyKitty marked this pull request as draft June 28, 2025 06:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 5, 2025

This PR is marked as stale, because it has been open for 7 days with no activity.

@github-actions github-actions bot added the Status: Stale No activity for more than a week label Jul 5, 2025
@EttyKitty EttyKitty removed the Status: Stale No activity for more than a week label Dec 22, 2025
@EttyKitty
Copy link
Copy Markdown
Collaborator Author

Bumping this. It should be ready for the merge. Someone just needs to update it and solve conflicts.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 5, 2026

This PR is marked as stale, because it has been open for 7 days with no activity.

@github-actions github-actions bot added the Status: Stale No activity for more than a week label Jan 5, 2026
@EttyKitty EttyKitty marked this pull request as ready for review January 27, 2026 13:46
@github-actions github-actions bot removed the Status: Stale No activity for more than a week label Jan 27, 2026
@github-actions github-actions bot added the Area: JSON Changes to external JSON files or their under-the-hood functionality label Jan 28, 2026
@EttyKitty
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 29, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
scripts/scr_marine_struct/scr_marine_struct.gml (2)

724-737: Tech-Priest, prevent negative max health for low constitution.
With constitution in the low teens, the multiplier becomes negative, yielding invalid max HP and corrupting healing/HP logic.

🛠️ Suggested clamp for constitution scaling
-        var max_h = 100 * (1 + ((constitution - 40) * 0.05));
+        var con_mult = max(0.25, 1 + ((constitution - 40) * 0.05)); // floor as needed
+        var max_h = 100 * con_mult;
@@
-        return max_health() + (increase * (1 + ((constitution - 40) * 0.05))); //calculate the effect of unit_health buffs
+        var con_mult = max(0.25, 1 + ((constitution - 40) * 0.05));
+        return max_health() + (increase * con_mult); //calculate the effect of unit_health buffs

1750-1756: Tech-Priest, pistol/flame “-50%” currently buffs melee.
_melee_mod += 0.5 raises output; it contradicts the stated penalty.

🔧 Proposed correction to apply a real 50% penalty
-                        _melee_mod += 0.5;
+                        _melee_mod *= 0.5;
                         if (primary_weapon.has_tag("flame")) {
-                            explanation_string += $"Primary is Flame: -50%#";
+                            explanation_string += $"Primary is Flame: x0.5#";
                         } else if (primary_weapon.has_tag("pistol")) {
-                            explanation_string += $"Primary is Pistol: -50%#";
+                            explanation_string += $"Primary is Pistol: x0.5#";
                         }
scripts/scr_initialize_custom/scr_initialize_custom.gml (1)

1675-1689: Tech-Priest, duplicate “wep2” keys will discard combi options.
The second wep2 overwrites the first, so combi weapons never get offered.

🛠️ Merge the two wep2 option arrays
 					"option": {
 						"wep1": [
 							[
 								["Power Fist", "Chainfist"], 4
 							],
 						],
-						"wep2": [
-							[
-								WEAPON_LIST_RANGED_COMBI, 3
-							],
-						],
-						"wep2": [
-							[
-								WEAPON_LIST_RANGED_HEAVY_TERMINATOR, 1
-							],
-						]
+						"wep2": [
+							[
+								WEAPON_LIST_RANGED_COMBI, 3
+							],
+							[
+								WEAPON_LIST_RANGED_HEAVY_TERMINATOR, 1
+							]
+						]
 					}
🤖 Fix all issues with AI agents
In `@objects/obj_pnunit/Alarm_0.gml`:
- Around line 22-25: If no enemy exists the code currently exits early but
leaves the engaged variable potentially stale; modify the early-exit branch that
checks instance_exists(enemy) so it explicitly sets engaged = false before
calling exit; locate the check using instance_exists(enemy) in Alarm_0
(obj_pnunit) and update that branch to assign engaged = false then exit to
ensure melee/ranged state is reset.

In `@scripts/scr_clean/scr_clean.gml`:
- Around line 174-176: Add a bounds check before indexing the apa array in
damage_infantry: verify _weapon_index is an integer within 0 ..
array_length(apa)-1 and if not use a safe fallback (e.g., set _armour_pierce = 0
or a default value) to avoid "array index out of range" errors; apply the same
guard wherever apa[_weapon_index] is accessed elsewhere in the file (all other
occurrences that mirror damage_infantry's lookup) so out‑of‑range or negative
indices are handled consistently.

In `@scripts/scr_en_weapon/scr_en_weapon.gml`:
- Around line 638-645: In the "Fleshborer" case the line if (obj_ini.preomnor =
1) is assigning rather than comparing and then sets atta to 19 (an unintended
huge reduction); change the condition to a comparison (if (obj_ini.preomnor ==
1)) and update the enhanced attack value from 19 to the correct value from the
balance spreadsheet (e.g., set atta to the intended boosted value such as 90 or
whatever the spreadsheet specifies) while keeping the rest of the case (arp,
rang, break) unchanged.
- Line 685: The conditional uses archaic "or(...)" syntax; replace it with
modern || operators and normal equality checks on obj_ncombat.enemy so the line
reads something like: if (obj_ncombat.enemy >= 10) || (obj_ncombat.enemy == 2)
|| (obj_ncombat.enemy == 5) || (obj_ncombat.enemy == 1) { — update all similar
conditions to use || and consistent spacing around operators (referencing the
obj_ncombat.enemy comparisons in this condition).
- Line 130: Several debug messages call show_debug_message_adv with the
misspelled literal "Unkown weapon name..."—correct all occurrences of the
misspelling to "Unknown" (search for the string "Unkown" inside
scr_en_weapon.gml or calls to show_debug_message_adv that include that text) so
each debug invocation reads "Unknown weapon name: {name}; script:
scr_en_weapon.gml"; update all eight instances accordingly.
- Around line 41-43: The conditionals are using the assignment operator '='
instead of the equality comparator '==' which is ambiguous; update each
conditional that compares values (e.g., the block checking obj_ini.preomnor and
setting atta, and the other occurrences noted: comparisons around lines
referencing obj_ini.preomnor, and the conditions at the other listed spots) to
use '==' for equality checks (e.g., change "if (obj_ini.preomnor = 1)" to "if
(obj_ini.preomnor == 1)") so the code clearly performs comparisons rather than
unintended assignments.

In `@scripts/scr_equipment_struct/scr_equipment_struct.gml`:
- Line 368: Fix the docstring typo for the parameter search_area by replacing
the mismatched quote in the allowed-values list so it reads "any", "weapon",
"gear", "armour", "mobility"; update the comment that documents the search_area
parameter in scr_equipment_struct.gml (the parameter declaration/comment block)
to use consistent double quotes around "gear" to avoid the `"gear'` mismatch.

In `@scripts/scr_marine_struct/scr_marine_struct.gml`:
- Around line 1769-1776: The melee explanation loses the Tech-Priest psychic
bonus because basic_wep_string is created after it is prefixed into
explanation_string; move the creation/assignment of basic_wep_string (the line
var basic_wep_string = $"{primary_weapon.name}: {primary_weapon.attack}#";) to
before you prepend it to explanation_string so the correct weapon string is
included, then update the other similar block around lines 1811-1813 the same
way; ensure you leave the subsequent _melee_mod adjustments and
explanation_string appends (including the _format_sign calls) unchanged in
order.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 29, 2026
@EttyKitty EttyKitty merged commit 31a6721 into main Jan 29, 2026
4 checks passed
@EttyKitty EttyKitty deleted the feat/combat-overhaul branch February 11, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: JSON Changes to external JSON files or their under-the-hood functionality Area: Sprites Changes to sprites/images or their under-the-hood functionality Category: Balance Affects game balance Category: Improvement Makes something better Size: Warning Type: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants